 <?php 
	include_once("../config/database.php");  
	class ThongTinQuan extends database {
		private $tenQuan;
	 	private $diaChi;
	 	private $soDtQuan;
	 	private $email;
	
		public function setTenQuan($tenQuan){ 
			$this->tenQuan = $tenQuan;
        }
        public function getTenQuan(){
            return $this->tenQuan;
        }
		public function setDiaChi($diaChi){ 
            $this->diaChi = $diaChi;
        }
        public function getDiaChi(){
            return $this->diaChi;
        }
		public function setSoDtQuan($soDtQuan){ 
            $this->soDtQuan = $soDtQuan;
        }
        public function getSoDtQuan(){
            return $this->soDtQuan;
        }
		public function setEmail($email){ 
            $this->email = $email;
        }
        public function getEmail(){
            return $this->email;
        }
	
   
    	public function add(){  
			$this->setQuery("insert into thongtinquan(tenQuan,diaChi,soDTQuan,email ;) values  ( '".$this->gettenQuan()."','".$this->getdiaChi()."','".$this->getsoDTQuan()."','".$this->getemail()."'") ;
			
			return $this->executeQuery(); 
		}
			  
	 	public function update(){     
			$this->setQuery ("update thongtinquan set tenQuan='".$this->gettenQuan()."' ,diaChi='".$this->getdiaChi()."' ,soDTQuan='".$this->getsoDTQuan()."' ,email='".$this->getemail()."'");
         	return $this->executeQuery();
		}

   		public function delete(){ 
            $this->setQuery("delete from thongtinquan where tenQuan ='".$this->gettenQuan()."'"); 
		   	return $this->executeQuery(); 
        }
		public function listOfthongtinquan () { 
  			mysql_query ("set character_set_results='utf8'");  
		 	$result = mysql_query("select * from thongtinquan"); 
		 	$data; 
		 	while ($row = mysql_fetch_array ($result)) 
					$data [] = $row;	 
		
		 	return $data; 
		}
	}
	
	?> 
			